package cn.tedu.supermarket.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

@Controller
public class LoginOutController {
    @RequestMapping("/bLoginOut")
    public String logOut(HttpSession session){
        System.out.println("删除user");
        session.removeAttribute("user");
//        session.invalidate();
        return "redirect:bIndex";
    }

    @RequestMapping("/sLoginOut")
    public String lOut(HttpSession session){
        System.out.println("删除user");
        session.removeAttribute("user");
//        session.invalidate();
        return "redirect:sLoginNow";
    }
}
